add scripting fundamentals section (issue #26) - #30
Conversation
Fills the empty fundamentals overview and adds 11 new articles covering the full scripting foundation: script setup, the game object, network basics, RPC reference, entity/world state, timing, inputs, debugging, best practices, and common script features. Also wires all pages into the sidebar. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
The quality of the writing in this article is not up to standard. Many details are obvious to the average scripter, few are actually related to zombs. I suggest a complete rewrite, maybe keep a section about built-in game handlers.
There was a problem hiding this comment.
The idea behind this article is good, but the way to approach the idea is wrong. This page should serve as a guide to what features of the game (e.g. what RPC does what, what entity update provides, etc) each script rely on, not just a demonstration of what each script does.
There was a problem hiding this comment.
This isn't an article suitable for the Script Fundamentals page.
|
|
||
| `game.world.entities` is a standard JavaScript `Map` containing every entity the client currently knows about. This includes players, zombies, buildings, resources (trees, stones), and neutral camps. | ||
|
|
||
| ```js |
There was a problem hiding this comment.
Wrong, game.world.entities is an Object.
|
|
||
| Zombies use their own model strings and have `entityClass === "Npc"`. | ||
|
|
||
| ## Common filtering patterns |
| if (t.uid === game.world.myUid) continue; | ||
| ``` | ||
|
|
||
| ## Coordinate conversion |
There was a problem hiding this comment.
This article overlaps with the existing Engine documentation and shouldn't be added.
| // Simple hint — appears briefly at the top of the screen | ||
| popup.showHint("message here"); | ||
|
|
||
| // Typed toast — use "success", "error", "warning", or "info" |
There was a problem hiding this comment.
This is bogus. PopupOverlay does not contain a toast component.
There was a problem hiding this comment.
While useful, this article could be merged with the Input category in Engine/main. Having a seperate article will sever the connection between the Engine documentation and Scripting.
There was a problem hiding this comment.
Perhaps suffers the same fate as input_ui.md, you can integrate this into Engine/World instead.
There was a problem hiding this comment.
Same problem with integration. Could be merged with Engine/Network instead.
There was a problem hiding this comment.
I request a full human written article for this file edit.
There was a problem hiding this comment.
I'm split about this article's position in the documentation. Perhaps it can be placed inside Engine/Network?
There was a problem hiding this comment.
This article is redundant. If anything, it is too short to be a standalone article, and should be incorporated into the Overview section.
There was a problem hiding this comment.
Once again, this article should be integrated into Engine/Network.
974738c to
02a5a91
Compare
Fills the empty fundamentals overview and adds 11 new articles covering the full scripting foundation: script setup, the game object, network basics, RPC reference, entity/world state, timing, inputs, debugging, best practices, and common script features. Also wires all pages into the sidebar. Claude written reviewed by TropicalBanana aka Goonicks